package com.lcz.mobilesafe.config;

import com.lcz.mobilesafe.utils.FileUtil;

import java.io.File;

/**
 * 全局常量类
 * Created by hp on 2017/3/1.
 */

public class Constants {
    public static final int CODE_UPDATE_DIALOG = 0;  //版本更新提示框
    public static final int CODE_URL_ERROR = 1;      //URL错误
    public static final int CODE_NET_ERROR = 2;      //网络错误
    public static final int CODE_JSON_ERROR = 3;     //解析json错误
    public static final int CODE_ENTER_HOME = 4;     //无更新直接进入主页


    //服务器地址
    // 本机地址用localhost, 但是如果用模拟器加载本机的地址时,可以用ip(10.0.2.2)来替换
    public static final String URL_SERVER = "http://192.168.31.245:8080/";
    //APP版本更新url
    public static final String URL_APPUPDATE = URL_SERVER + "update.json";
    //更新下载
    public static final String URL_DOWNLOAD = URL_SERVER + "mobilesafe_2.0.apk";
    //更新版本后的存储位置
    public static final String fileFolder = FileUtil.getRootPath().getAbsolutePath() + File.separator + "mobilesafe/mobilesafe.apk";
}
